/**
 * 
 */
package com.yst.metho.web.application.components.listingview;

import nextapp.echo2.app.Table;

import com.yst.metho.web.application.interfaces.IListingViewModel;

/**
 * Action qui permet de recharger les donnees contenues dans la table. Cette
 * action est generique a tous les composants.
 * 
 * @author perso
 * 
 */
public class DeleteToolbarAction extends AbstractConfirmationAction
{

	static final String BUTTON_ACTION_COMMAND = "DeleteClicked";

	static final String CONFIRMATION_MESSAGE = "Etes vous sur de vouloir supprimer {0}?";

	public DeleteToolbarAction(IListingViewModel model, IConfirmationAction action, Table table)
	{
		super(action.getRight(), "Delete", BUTTON_ACTION_COMMAND, CONFIRMATION_MESSAGE);
		mModel = model;
		mActionToPerform = action;
		mTable = table;
		setActionCommand(BUTTON_ACTION_COMMAND);
		setEnabled(false);
		addActionListener(this);
	}

}
